package translinkApp.Data.Journey.Search;

import java.io.Serializable;

import translinkApp.Data.DataTypes.Date;
import translinkApp.Data.DataTypes.Time;
import translinkApp.Data.ResolvedLocation.ResolvedLocation;

public class JourneySearch implements Serializable {

	private static final long serialVersionUID = -2530623016002220022L;

	public enum TimeType {
		LeaveAfter, ArriveBefore, FirstTrip, LastTrip
	}

	public enum TransportType {
		All, Bus, Train, Ferry
	}

	private ResolvedLocation fromLocation;
	private ResolvedLocation toLocation;
	private TransportType transport;
	private TimeType timeType;
	private Time time;
	private Date date;
	private String journeyName;

	public TransportType getTransport() {
		return transport;
	}

	public void setTransport(TransportType transport) {
		this.transport = transport;
	}

	public String getJourneyName() {
		return journeyName;
	}

	public void setJourneyName(String journeyName) {
		this.journeyName = journeyName;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public ResolvedLocation getFromLocation() {
		return fromLocation;
	}

	public void setFromLocation(ResolvedLocation fromLocation) {
		this.fromLocation = fromLocation;
	}

	public Time getTime() {
		return time;
	}

	public void setTime(Time time) {
		this.time = time;
	}

	public TimeType getTimeType() {
		return timeType;
	}

	public void setTimeType(TimeType timeType) {
		this.timeType = timeType;
	}

	public ResolvedLocation getToLocation() {
		return toLocation;
	}

	public void setToLocation(ResolvedLocation toLocation) {
		this.toLocation = toLocation;
	}

	public JourneySearch(ResolvedLocation fromLocation, ResolvedLocation toLocation,
			TransportType transport, TimeType timeType, Time time, Date date) throws Exception {
		super();

		this.fromLocation = fromLocation;
		this.toLocation = toLocation;
		this.transport = transport;

		this.timeType = timeType;

		this.time = time;
		this.date = date;
	}
}